package TOOLS;
import java.net.InetAddress;
import java.net.UnknownHostException;

import javax.swing.JFrame;
import javax.swing.JTable;
import javax.swing.WindowConstants;

import TOOLS.SQLtool;

public class test001_newDB {

	public static void main(String[] args) {
		SQLtool sql=new SQLtool();
		String IPaddr="192.168.1.1";
		try {
			InetAddress addr = InetAddress.getLocalHost();
			IPaddr=addr.getHostAddress();
		} catch (UnknownHostException e1) {
			;
		}
		sql.config(IPaddr, "AKS2019", "sa", "123456");
//		sql.config("192.168.0.39", "AKS2019", "sa", "abcd1234!");
		sql.config("192.168.0.109", "XHAKS2021", "ma", "123456");
		try {
			JTable t= sql.select("select boxNumber from packageStation where station='none'");
			String str=(String) t.getValueAt(0, 0);
			System.out.print(str);
			System.exit(0);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
